#!/usr/bin/env bash

curl localhost:9200/img_test/fulltext/_search -d '
{
"query": {
  "function_score" : {
    "query" : {
      "match_all" : {
        "boost" : 1.0
      }
    },
    "functions" : [
      {
        "filter" : {
          "match_all" : {
            "boost" : 1.0
          }
        },
        "script_score" : {
          "script" : {
            "inline" : "hamming_score",
            "lang" : "native",
            "params" : {
              "f" : "bin_sigs",
              "fea" : [],
              "verbose" : true
            }
          }
        }
      }
    ],
    "score_mode" : "sum",
    "boost_mode" : "replace",
    "max_boost" : 3.4028235E38,
    "boost" : 1.0
  }
 }
}'